﻿@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout_zone.cshtml";
}
    
<!-- Content Box Start -->
<div class="contentcontainer">
    <div class="headings alt">
        <h2>我的指数</h2>
    </div>
    <div class="contentbox">
        <table>
            <tr>
                <td width="150"><strong><span class="usagetxt redtxt">才华指数</span></strong></td>
                <td width="500">
                    <div class="usagebox">
                		<div class="highbar" style="width: @ViewBag.Bar1;"></div>
                    </div>
                </td>
            </tr>
            <tr>
                <td><strong><span class="usagetxt orangetxt">财商指数</span></strong></td>
                <td>
                    <div class="usagebox">
                		<div class="midbar" style="width: @ViewBag.Bar2;"></div>
                    </div>
                </td>
            </tr>
            <tr>
                <td><strong><span class="usagetxt greentxt">活跃指数</span></strong></td>
                <td>
                    <div class="usagebox">
                		<div class="lowbar" style="width: @ViewBag.Bar3;"></div>
                    </div>
                </td>
            </tr>
        </table>
    </div>
</div>
<!-- Content Box End -->
        
    <!-- Graphs Box Start -->
<div class="contentcontainer" id="graphs">
    <div class="headings alt">
        <h2 class="left">站点动态</h2>
        <ul class="smltabs">
            <li><a href="#graphs-1">知识动态</a></li>
            <li><a href="#graphs-2">商城动态</a></li>
            <li><a href="#graphs-3">文档动态</a></li>
        </ul>
    </div>
    <div class="contentbox" id="graphs-1">
	    <table width="100%">
            <thead>
                <tr>
                    <th>名称</th>
                    <th>发布者</th>
                    <th>知识类型</th>
                    <th>发布时间</th>
                    <th>关注次数</th>
                    <th>详细</th>
                </tr>
            </thead>
            <tbody>
                @foreach (var item in (IEnumerable<KnowledgeCommunity.Model.Knowledge>)ViewData["TopKno"])
                {
                <tr class="alt">
                    <td>
                        <a href="@Url.Action("Details", "Knowledge", new { id=item.Id})" title="">
                        @item.Title
                        </a>
                    </td>
                    <td>
                        @item.UserName
                    </td>
                    <td>
                        @Enum.GetName(typeof(KnowledgeCommunity.Service.Enum.KFirstSort),Convert.ToInt32(item.FirstSort))
                    </td>
                    <td>
                        @item.AddTime
                    </td>
                    <td>
                        @item.ClickNum
                    </td>
                    <td>
                        <a href="@Url.Action("Details", "Knowledge", new { id=item.Id})" title="">详细</a>
                        </td>
                </tr>
                }
            </tbody>
        </table>
    </div>
    <div class="contentbox" id="graphs-2">
        <table width="100%">
            <thead>
                <tr>
                    <th>名称</th>
                    <th>发布者</th>
                    <th>发布时间</th>
                    <th>类别</th>
                    <th>数量</th>
                    <th>价格</th>
                    <th>详细</th>
                </tr>
            </thead>
            <tbody>
                @foreach (var item in (IEnumerable<KnowledgeCommunity.Model.Commodity>)ViewData["TopCom"])
                {
                <tr class="alt">
                    <td>
                       <a href="@Url.Action("Details", "Commodity", new { id = item.Id })" title="">
                        @item.Title
                       </a>
                    </td>
                    <td>
                        @item.UserName
                    </td>
                    <td>
                        @item.AddTime
                    </td>
                    <td>
                        @Enum.GetName(typeof(KnowledgeCommunity.Service.Enum.GoodType),item.Sort)
                    </td>
                    <td>
                        @item.Count
                    </td>
                    <td>
                        @item.CurrentPrice
                    </td>
                    <td>
                        <a href="@Url.Action("Details", "Commodity", new { id = item.Id })" title="">详细</a>
                    </td>
                </tr>
                }
            </tbody>
        </table>
    </div>
    <div class="contentbox" id="graphs-3">
	    <table width="100%">
            <thead>
                <tr>
                    <th>名称</th>
                    <th>发布者</th>
                    <th>发布时间</th>
                    <th>属性</th>
                    <th>状态</th>
                    <th>价值</th>
                    <th>下载</th>
                    <th>详细</th>
                </tr>
            </thead>
            <tbody>
                @foreach (var item in (IEnumerable<KnowledgeCommunity.Model.Document>)ViewData["TopDoc"])
                {
                <tr class="alt">
                    <td>
                       <a href="@Url.Action("Details", "Document", new { id=item.Id})" title="">
                        @item.Title
                       </a>
                    </td>
                    <td>
                        @item.Contributor
                    </td>
                    <td>
                        @item.AddTime
                    </td>
                    <td>
                        @Enum.GetName(typeof(KnowledgeCommunity.Service.Enum.IsPublic),item.IsPublic)
                    </td>
                    <td>
                        @Enum.GetName(typeof(KnowledgeCommunity.Service.Enum.State),item.State)
                    </td>
                    <td>
                        @item.Value
                    </td>
                    <td>
                        <a href="@Url.Content(item.LoadUrl)">下载此文档</a>
                    </td>
                    <td>
                        <a href="@Url.Action("Details", "Document", new { id=item.Id})" title="">详细</a>
                    </td>
                </tr>
                }
            </tbody>
        </table>
    </div>
</div>
<!-- Graphs Box End -->
        

        
    <div class="contentcontainer med left">
    <div class="headings alt">
        <h2>热点论坛</h2>
    </div>
    <div class="contentbox">
        @foreach (var item in (IEnumerable<KnowledgeCommunity.Model.Tribune>)ViewData["TribuneList"])
        {
          <a href="@Url.Action("Details", "Tribune", new { id=item.Id})" class="btnalt" >@item.Title</a>
        }
    </div>
</div>
        
    <div class="contentcontainer sml right" id="tabs">
    <div class="headings">
        <h2 class="left">站点新闻</h2>
        <ul class="smltabs">
            <li><a href="#tabs-1">Top News</a></li>
            <li><a href="#tabs-2">New User</a></li>
        </ul>
    </div>
    <div class="contentbox" id="tabs-1">
        <h2 style="margin-bottom: 15px;">社区公告:</h2>
        <p><strong>List News</strong></p>
        <ul class="list">
           @foreach (var item in (IEnumerable<KnowledgeCommunity.Model.Topic>)ViewData["TopTopic"])
           {
            <li><a href="@Url.Action("Details", "Topic", new { id=item.Id})"> @item.Title </a></li>
           }
        </ul>
    </div>

   <div class="contentbox nopad" id="tabs-2">
        @foreach (var item in (IEnumerable<KnowledgeCommunity.Model.UserAccount>)ViewData["NewUsers"])
        {     
        <div class="newsitem">
            <img src="@Url.Content(item.ImgUrl)" class="hoverimg" alt="News" />
            <h3>@item.UserName</h3>
        </div>
        }
    </div>
</div>
        
<div style="clear:both;"></div>




